//
//  KLSGRadioPlayManager.h
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/11/2.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KLSGPlayerView.h"

@protocol  KLSGRadioPlayManagerDelegate <NSObject>

- (void)playingWithProgress:(CGFloat)progress;

@end

@interface KLSGRadioPlayManager : NSObject

// 单例方法
+ (KLSGRadioPlayManager *)shareManager;

// 属性声明
// 播放器
@property (nonatomic, strong) AVPlayer *player;
@property (nonatomic, strong) AVPlayerItem *playerItem;
// 播放视图
//@property (nonatomic, strong) KLSGPlayerView *playerView;

@property (nonatomic, assign) CGFloat volume; // 音量
@property (nonatomic, assign) BOOL isPlaying; // 播放状态
@property (nonatomic, weak) id<KLSGRadioPlayManagerDelegate> delegate; // 设置代理

// 设置播放器的URL
- (void)playingWithUrl:(NSString *)url;

// 开始播放
- (void)musicPlay;

// 暂停播放
- (void)musicPause;

// 播放状态切换
- (BOOL)musicPlayOrPause;

// slider滑动，设置播放进度方法
- (void)musicSeekToTime:(CGFloat)time;



@end
